package com.ledtechdesign.service;

import java.util.List;

import com.ledtechdesign.afcs.IAuthToken;
import com.ledtechdesign.beans.Account;
import com.ledtechdesign.beans.Item;
import com.ledtechdesign.beans.api.IAccountInfo;
import com.ledtechdesign.beans.api.IMeetingInfo;
import com.ledtechdesign.beans.api.IMeetingInfoDescriptor;
import com.ledtechdesign.beans.api.IRepository;
import com.ledtechdesign.service.api.IAFCSServiceResult;

public interface IAFCSService<T extends IAFCSServiceResult> {

	final static String contentAppSegment = "/app/content";
	final static ContainerType ROOM_ITEMS = ContainerType.ROOM;
	final static ContainerType TEMPLATE_ITEMS = ContainerType.TEMPLATE;

	IMeetingInfoDescriptor createRoom(IAuthToken authToken, String room)
			throws Exception;

	IMeetingInfoDescriptor createRoom(IAuthToken authToken, String room,
			String template) throws Exception;

	IMeetingInfoDescriptor createTemplate(IAuthToken authToken, String room,
			String basedOn) throws Exception;

	// IRepository listItems(IAuthToken authToken, ContainerType containerType)
	// throws Exception;

	IRepository delete(IAuthToken authToken, String item) throws Exception;

	// TODO does authToken needed?
	IRepository delete(IAuthToken authToken, String item,
			ContainerType containerType) throws Exception;

	IRepository deleteRoom(IAuthToken authToken, String r) throws Exception;

	IRepository deleteTemplate(IAuthToken authToken, String r) throws Exception;

	IAccountInfo getAccountInfo(IAuthToken authToken) throws Exception;

	// String?
	T getNodes(IAuthToken authToken, String room, String path) throws Exception;

	IMeetingInfo getRoomInfo(IAuthToken authToken, String room)
			throws Exception;

	public IMeetingInfoDescriptor initializationService(IAuthToken token,
			Account account);

	List<Item> listItems(IAuthToken authToken, ContainerType containerType)
			throws Exception;

	List<Item> listRooms(IAuthToken authToken) throws Exception;

	// TODO tpye it as Template
	List<Item> listTemplates(IAuthToken authToken) throws Exception;
	
	String fetchSessionSecret(IAuthToken authToken,String roomInstanceURI) throws Exception;
	

	public String preInitializationService(Account account);

}
